<!DOCTYPE html>
<html>

<head>
    <title>短信账号管理</title>
    <include file='public/head'>
</head>

<body>
    <div class="wrap js-check-wrap" id="addFormJt">

        <form method="POST" class="js-ajax-form" id="add-form" action="">
            <table class="table table-bordered table-hover" style="text-align:center;">
                <input type="hidden" name="id" value="{$data.id}">
                <input type="hidden" name="uid" value="{$data.uid}">
                <tr>
                    <td class="td-head">用户id</td>
                    <td class="td-body">
                        {$data.uid}
                    </td>
                </tr>
                <tr>
                    <td class="td-head">用户账号</td>
                    <td class="td-body">
                        {$data.account}
                    </td>
                </tr>
                <tr>
                    <td class="td-head">短信条数</td>
                    <td class="td-body">
                        {$data.total_num-$data.consume_num}/{$data.total_num}
                    </td>
                </tr>
                <tr>
                    <td class="td-head">支付方式</td>
                    <td class="td-body">
                        <input type="text" class="form-control" required name="pay_way" placeholder="输入支付方式" value="" />
                    </td>
                </tr>
                <tr>
                    <td class="td-head">充值金额</td>
                    <td class="td-body">
                        <input type="text" class="form-control" required name="money" placeholder="输入充值金额" value="" />
                    </td>
                </tr>
                <tr>
                    <td class="td-head">购买数量</td>
                    <td class="td-body">
                        <input type="text" class="form-control" required name="num" placeholder="输入购买数量" value="" />
                    </td>
                </tr>
                <tr>
                    <td class="td-head">备注</td>
                    <td class="td-body">
                        <textarea name="remark" id="" class="form-control" rows="10"></textarea>
                    </td>
                </tr>
            </table>
            <div style="text-align:center;">
                <!-- <button type="submit" class="btn btn-success js-ajax-submit" name="on" >提交</button> -->
                <!-- 测试的时候js-ajax-submit从class里取出来 -->
            </div>
        </form>
    </div>


    <include file="public/scripts" />
    <script src="__STATIC__/js/layer/layer.js"></script>


    <script type="text/javascript">

        /**
         * 获取窗口中的元素，然后返回给父级
         * @return {[type]} [description]
         */
        function callbackdata() {
            var obj = {};
            var pay_way = $('input[name=pay_way]').val();
            if (pay_way.length == 0) {
                layer.msg('支付方式不能为空');
                return false;
            }
            var money = $('input[name=money]').val();
            if (money.length == 0) {
                layer.msg('充值金额不能为空');
                return false;
            }
            var num = $('input[name=num]').val();
            if (num.length == 0) {
                layer.msg('购买数量不能为空');
                return false;
            }
            var remark = $('textarea[name=remark]').val();
            var id = $('input[name=id]').val();
            var uid = $('input[name=uid]').val();

            obj['id'] = id;
            obj['uid'] = uid;
            obj['pay_way'] = pay_way;
            obj['money'] = money;
            obj['num'] = num;
            obj['remark'] = remark;
            return obj;
        }    
    </script>

</body>

</html>